﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using Eassets.Data.Global;
using Eassets.Layered.Domain.Global;


namespace Eassets.Service.Global
{
    public class OrganizationLevelService
    {
        OrganizationLevelData organizationLeveldata = new OrganizationLevelData();

        /// <summary>
        /// Inserts organizationLevel.
        /// </summary>
        /// <param name="organizationLevel"></param>
        public void AddOrganizationLevel(OrganizationLevel organizationLevel)
        {
            if (organizationLevel != null)
            {
                organizationLeveldata.AddOrganizationLevel(organizationLevel);
            }
        }

        /// <summary>
        /// Updates organizationLevel.
        /// </summary>
        /// <param name="organizationLevel"></param>
        public void ModifyOrganizationLevel(OrganizationLevel organizationLevel)
        {
            if (organizationLevel != null)
            {
                organizationLeveldata.ModifyOrganizationLevel(organizationLevel);
            }
        }

        /// <summary>
        /// Delete organizationLevel.
        /// </summary>
        /// <param name="organizationLevelId"></param>
        public void DeleteOrganizationLevel(long organizationLevelId)
        {
            if (organizationLevelId != 0)
            {
                organizationLeveldata.DeleteOrganizationLevel(organizationLevelId);
            }
        }

        /// <summary>
        /// GetbyId organizationLevel.
        /// </summary>
        /// <param name="organizationLevelId"></param>
        /// <returns></returns>
        public OrganizationLevel GetByIdOrganizationLevel(long organizationLevelId)
        {
            return organizationLeveldata.GetByIdOrganizationLevel(organizationLevelId);
        }

        /// <summary>
        /// GetAll organizationLevel.
        /// </summary>
        /// <returns></returns>
        public Collection<OrganizationLevel> GetAllOrganizationLevel()
        {
            return organizationLeveldata.GetAllOrganizationLevel();
        }
    }
}

